package com.fyl;

import org.springframework.context.ApplicationContext;

import javax.servlet.ServletContext;

public class WebApplicationContextUtils {
   public static ApplicationContext getWebApplicationContextByServletContext(ServletContext servletContext) {
       ApplicationContext context = (ApplicationContext) servletContext.getAttribute("applicationContext");
       return context;
    }
}
